<%--
  Created by IntelliJ IDEA.
  User: xwj32
  Date: 2023-05-11
  Time: 14:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>医院排队叫号系统</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/js/bootstrap.bundle.min.js"></script>
  <jsp:include page="include/mangerheadtag.jsp"/>
</head>
<body>
<jsp:include page="include/head.jsp"/>
<jsp:include page="include/menu.jsp"/>

<div style="margin-top: 100px;margin-left: 300px">
<div class="container mt-3" >
  <h1><img src="/images/img/修改信息.png" alt="">更改信息</h1>
  <form action="<%=request.getContextPath()%>/UserServlet" method="get">
    <input type="hidden" name="action" value="updateUser">
    <input type="hidden" name="id" value="${cookie.get("id").value}">
    <div class="mb-3 mt-3">
      <label for="name">姓名：</label>
      <input type="text" class="form-control" id="name" value="${cookie.get("name").value}" placeholder="请修改昵称" name="username">
    </div>
    <div class="mb-3">
      <label for="phonenumber">电话号码：</label>
      <input type="text" class="form-control" id="phonenumber" value="${cookie.get("phoneNumber").value}" placeholder="请修改电话号码" name="phonenumber">
    </div>
    <div class="mb-3">
      <label for="password">密码：</label>
      <input type="text"  class="form-control" id="password" value="${cookie.get("password").value}" placeholder="请修改密码" name="password">
    </div>
    <div><button type="submit" class="btn btn-primary" style="margin-top: 10px" id="update">确认修改</button></div>
  </form>
</div>
</div>
<script>

  var btn = document.getElementById("update");
  btn.onclick = function (){
   return confirm("你确认更新信息吗");
  }
</script>
</body>
</html>
